using System;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Scheduling;
using DotNetNuke.Services.Search;

namespace Mn.Framework.UI.Dnn
{

    public class MnModuleController : MnModuleBase, ISearchable
    {
        public SearchItemInfoCollection GetSearchItems(ModuleInfo modInfo)
        {
            var searchItemCollection = new SearchItemInfoCollection();
            return searchItemCollection;
        }
    }

    public class DnnModuleScheduler : SchedulerClient
    {
        private ScheduleHistoryItem oLogger = null;
        public DnnModuleScheduler(ScheduleHistoryItem logger)
            : base()
        {
            oLogger = logger;

        }

        public override void DoWork()
        {
            try
            {
                oLogger.Succeeded = true;

            }
            catch (Exception exp)
            {
                oLogger.Succeeded = false;
                oLogger.AddLogNote(exp.ToString());
                Errored(ref exp);
                DotNetNuke.Services.Exceptions.Exceptions.LogException(exp);
            }
        }
    }
}

